package com.example.login.service.Impl;

import com.example.login.entity.UserEntity;
import com.example.login.mapper.UserMapper;
import com.example.login.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements IUserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public String login(UserEntity userEntity) {
         int result=userMapper.login(userEntity);
         String rs="fail";
         if(result>=1){
             rs="success";

        }
        return rs;
    }
    @Override
    public String register(UserEntity userEntity) {
        int result=userMapper.register(userEntity);
        String rs="fail";
        if(result>=1){
            rs="success";

        }
        return rs;
    }
}
